<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ page import="java.util.*,
						org.apache.commons.logging.Log, 
						org.apache.commons.logging.LogFactory,
						com.ophelisis.common.util.*,
						com.ophelisis.common.consts.*,
						com.ophelisis.actions.system.*"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="page" uri="/tld/xdp-page.tld"%>

<c:choose>
	<c:when test="${totalCnt != '' && !empty totalCnt}">
		<c:set var="totalCnt" value="${totalCnt}" />
	</c:when>
	<c:otherwise>
		<c:set var="totalCnt" value="0" />
	</c:otherwise>
</c:choose>

<!-- Title Start -->
<div id="formtitle">
	<input type="hidden" id="loadCheck" name="loadCheck" value="OK" />
	<form id="searchForm" name="searchForm" method="post">
		<table class="viewstyle1">
			<colgroup>
				<col width="120" />
				<col width="220" />
				<col width="" />
			</colgroup>
			<tr>
				<td class="titleColumn">
				동 이름&nbsp;
				<input type="text" id="searchVal1" name="searchVal1" value="${searchVal1}" class="in3 width_200p" />
				<img id="searchBtn" src="images/btn/search.gif" class="clickable" style="position:relative; top:7px;" />
				</td>
			</tr>
		</table>
	</form>
	<table id="list" class="sortable liststyle1">
		<colgroup>
			<col width="80" />
			<col width="80" />
			<col width="90" />
			<col width="" />
			<col width="150" />
			<col width="45" />
		</colgroup>
		<tr>
			<th id ="0" class="sorting" scope="col">우편번호 <img src="images/icon/arrow_up.png" class="sortImg" /></th>
			<th id ="1" class="sorting" scope="col">시/도 <img src="images/icon/arrow_up.png" class="sortImg" /></th>
			<th id ="2" class="sorting" scope="col">구/군 <img src="images/icon/arrow_up.png" class="sortImg" /></th>
			<th id ="3" class="sorting" scope="col">동 <img src="images/icon/arrow_up.png" class="sortImg" /></th>
			<th id ="4" class="sorting" scope="col">번지 <img src="images/icon/arrow_up.png" class="sortImg" /></th>
			<th scope="col">선택</th>
		</tr>
	</table>
</div>
<!-- Title End -->
<!-- List Start -->
<div id="formlist1" class="noborder">
	<table class="sortData liststyle1">
	    <colgroup>
			<col width="80" />
			<col width="80" />
			<col width="90" />
			<col width="" />
			<col width="150" />
			<col width="45" />
	    </colgroup>
	   <c:choose>
	    	<c:when test="${zipcodeList != '' && !empty zipcodeList}">
				<c:forEach var="list" items="${zipcodeList}" varStatus="status">
					<tr>
						<td scope="col">${list.zipcode}</td>
						<td scope="col" class="tex_left">${list.sido}</td>
						<td scope="col" class="tex_left">${list.gugun}</td>
						<td scope="col" class="tex_left">${list.dong}</td>
						<td scope="col" class="tex_left">${list.bunji}</td>
						<td scope="col"><img src="images/btn/btn_select2.gif" class="clickable" onclick="javascript:pmModule.select('${list.zipcode}','${list.sido} ${list.gugun} ${list.dong}');" /></td>
					</tr>
				</c:forEach>
			</c:when>
			<c:otherwise>
				<tr>
					<td id="nodata" colspan="6">- 해당 조건의 검색 내역이 없습니다.</td>
				</tr>			
			</c:otherwise>
	    </c:choose>
	</table>
</div>
<!-- List End -->
<c:if test="${totalCnt > 0}">
<div class="pagenum" style="clear: both; display: inline;">
	<page:pagelist startRowNo="${_startRowNo}" totalCnt="${totalCnt}" action="zipcode.action" displyRowCnt="${_pageSize}"></page:pagelist>
</div>
</c:if>